home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / music / dtmf_rtd.zip / DTMF386D.DOC next >
Text File  |  1995-01-16  |  12KB  |  290 lines

  1.                ╔═══════════════════════════════════════════════════╗
  2.                ║  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ║
  3.                ║  ▒                                             ▒  ║
  4.                ║  ▒           DTMF Real-Time Decoder            ▒  ║
  5.                ║  ▒      386 and 387 Turbo DEMO Versions        ▒  ║
  6.                ║  ▒                                             ▒  ║
  7.                ║  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ║
  8.                ║                                                   ║
  9.                ║───────────────────────────────────────────────────║
  10.                ║    Shima-nized Advanced Utilities - J.M. Shima    ║
  11.                ║         Copyright (c) 1994-95 by James Shima      ║
  12.                ║                 All Rights Reserved               ║
  13.                ║                                                   ║
  14.                ╚═══════════════════════════════════════════════════╝
  15.  
  16.                    ▐▐▐▐   R E F E R E N C E   M A N U A L   ▐▐▐▐
  17.  
  18.  
  19.  
  20.  
  21.  
  22.              » Type DTMF386D at the DOS prompt for a summary of options «
  23.  
  24.  
  25.  
  26. INTRODUCTION
  27. ▀▀▀▀▀▀▀▀▀▀▀▀
  28.  
  29. * This program functions as a real-time DTMF decoder.  One application
  30.   where DTMF tones are used is in the standard American telephone dialing
  31.   system.  The standard DTMF tones represent the numbers 1,2,3,4,5,6,7,
  32.   8,9,0,*,# on a standard keypad interface.  The four reserved DTMF tones
  33.   representing A,B,C,D are supported in the REGISTERED version.
  34.  
  35. * This program is capable of decoding DTMF tones from a Soundblaster
  36.   Version 1.0 - 2.0, Soundblaster Pro, or TRUE Soundblaster compatible
  37.   (16-bit or 8-bit) sound card in real-time.  Soundblaster 16 support
  38.   has been reported to work but is fully untested at this point.
  39.  
  40. * This 386 version is geared for slower machines that cannot perform
  41.   real-time processing with the 486 version.  HOWEVER, due to the
  42.   streamlining of the algorithm, results MAY NOT be as accurate as
  43.   the 486 version and can be susceptible to more decoding errors than
  44.   the 486 version.
  45.  
  46. * This program attempts to use your coprocessor for faster floating
  47.   point speed.  If you do not have a coprocessor, use the DTMF386D.EXE
  48.   executable.  Otherwise, use DTMF387D.EXE for coprocessor support.
  49.  
  50. * The Soundblaster or compatible sound card MUST be connected to port
  51.   address 220h and using DMA 1 (the factory settings).
  52.  
  53. * The input to the Soundblaster mic or line input can originate
  54.   from any external communication device that supplies DTMF tones
  55.   to the sound card.
  56.  
  57. * This program accepts COMMAND-LINE ARGUMENTS that are passed to the
  58.   DTMF decoder.
  59.  
  60. * For a list of the arguments, type DTMF386D at the DOS prompt.
  61.  
  62. * The DEMO only decodes a maximum of 4 numbers.  Interested
  63.   persons can receive the REGISTERED version with no limitations.
  64.  
  65.  
  66. SOFTWARE LICENSE
  67. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  68.  
  69. The 386 DEMO version of the DTMF real-time decoder is shareware, and is free
  70. for personal use only.  This is true as long as the DEMO is
  71. not alterted in any fashion.  Registered users will receive the REGISTERED
  72. version of the DTMF decoder and will receive documentation stating such.
  73.  
  74.  
  75. The author offers no warranties on this program.  This program is provided
  76. as is.  Use this program at your own risk.  I assume no responsibility in your
  77. actions while you are using this program.  The author is not liable for any
  78. damage caused to your computer while you are using this program.  Using
  79. the program is your compliance to this statement and the license.
  80.  
  81.  
  82. COMMAND-LINE ARGUMENT SCREEN
  83. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  84.  
  85. The program argument screen should look as follows:
  86.  
  87. Real-Time Dual-Tone Multi-Frequency Decoder, 386 DEMO Version
  88. Shima-nized Advanced Utilities (c) 1994-95 - J.M. Shima
  89.  
  90. USAGE: DTMF386D  <sample_rate>  switches:[ <-t>number ]
  91.  
  92. Notes:  <sample_rate> = rate of incoming samples in Hz. The range
  93.                         is 4000 < fs < 12000 for DTMF decoding.
  94.                         The RECOMMENDED value is 4000 Hz for real-time
  95.                         decoding.
  96.  
  97. ** Sound card must be Soundblaster 1.0 - 2.0, Pro, or Soundblaster
  98. ** compatible connected to port 220h using DMA 1 (The factory settings).
  99.  
  100. Switches: -t = Defines the S/N threshold value (in dB) that DTMF tones
  101.                must surpass for proper detection.
  102.                The threshold S/N value can be any real, non-negative number.
  103.                DEFAULT value is 20 dB.
  104.  
  105.  
  106. EXPLANATION OF COMMAND-LINE ARGUMENTS
  107. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  108.  
  109. <sample_rate>   -->  Input sample rate.  Must be in the range of 4000 to
  110.                      12000 Hertz (Hz).  For DTMF detection, it is HIGHLY
  111.                      RECOMMENDED THAT YOU USE 4000 Hz for
  112.                      real-time processing.
  113.  
  114. Switches:
  115. ════════
  116.  
  117.  -t<number>    -->  The threshold that the DTMF tones must exceed over the
  118.                     noise floor for detection (in dB).  Typically, strong
  119.                     DTMF tones will be 20-40 dB stronger than the noise
  120.                     in the signal.  However, noisy signals lower this
  121.                     signal-to-noise (S/N) ratio.  The threshold parameter
  122.                     allows the user to set the S/N threshold for detection
  123.                     of noisier or corrupted DTMF tones.
  124.  
  125.                     * NOTE:  If nothing is entered, then the DEFAULT S/N
  126.                              threshold value is 20dB, which is a figure
  127.                              of merit for normal tones.
  128.  
  129.                     One must realize that dB is a logarithmic scale
  130.                     of signal gain through the equation:
  131.                     dB = 20 * log(signal gain).
  132.                     Thus, a large signal gain represents a small
  133.                     increase in the dB number (i.e. 40dB is a 100x
  134.                     signal gain, while 20dB is a 10x signal gain).
  135.  
  136.  
  137. EXAMPLES OF RUNNING DTMF386D
  138. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  139.  
  140. * Program start:  Run the program by typing the executable name.
  141. * Program end:  The program ENDS when ANY key is hit during decoding!
  142.  
  143.  
  144. DTMF386D 4000            -->   Input sample rate is 4000 Hz.
  145.                                Input S/N threshold defaults to 20dB.
  146.  
  147. DTMF386D 4000 -t25       -->   Input sample rate is 4000 Hz.  The input
  148.                                S/N threshold is set to 25dB.
  149.  
  150. DTMF386D 4000 -t15       -->   Input sample rate is 4000 Hz.  The S/N
  151.                                threshold is set to 15dB.
  152.  
  153.  
  154. IMPORTANT NOTES
  155. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  156.  
  157. Since this is a real-time piece of software, certain rules must be followed
  158. for proper use.
  159.  
  160. Sampling rate:
  161.                 Increasing the sampling rate means that samples are ready
  162.                 faster.  Thus, the computer has less time to do what
  163.                 is has to before it has to fetch more samples.  So,
  164.                 one must make the sample rate as low as it can go
  165.                 and still represent the maximum frequency in the signal.
  166.                 For DTMF tones, this minimum sampling rate is 4000 Hz,
  167.                 (due to Nyquist theorem).  IT BEHOOVES YOU to use this rate.
  168.                 Sampling at a rate higher than necessary gains you
  169.                 nothing, but INCREASES your computational overhead. For real-
  170.                 time operation, make your sampling rate as low as you can
  171.                 without violating Nyquist theorem (2x the maximum freq.
  172.                 in the signal).  So, for all practical purposes, use
  173.                 4000 Hz as your sampling rate.
  174.  
  175. Real-time processing:
  176.                 If your system cannot handle real-time processing, that
  177.                 means data will be lost.  While your system is processing
  178.                 the old data, it doesn't have time to retrieve the new
  179.                 data coming in.  This new data is discarded and the
  180.                 computer picks up fresh data when it's done with its
  181.                 current task.  Thus, results are inconsistent when real-time
  182.                 processing cannot be done.  The probability of detecting
  183.                 a given tone depends on where your computer is in its
  184.                 processing stage.  You can see that its nearly impossible
  185.                 to debug whether or not real-time processing is happening
  186.                or not.  On top of this, your CPU takes care of many other
  187.                 housekeeping tasks.  Therefore, I have deemed "real-time"
  188.                 on the fact that a DTMF tone does not go undetected as given
  189.                 in the DTMF standards.  Closely spaced tones will be detected
  190.                 in real-time if your system can run the code in real time.
  191.  
  192.                 Noisy DTMF tones are also error ridden since the processing
  193.                 window is so small no noise immunity algorithm can be
  194.                 implemented.  Note that non-pure tones may not be detected
  195.                 properly!
  196.  
  197.  
  198.  
  199. INCLUDED FILES
  200. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  201.  
  202. DTMF386D.EXE   -->  DTMF real-time decoder, 386 demo version.
  203. DTMF387D.EXE   -->  386 demo version with 80387 coprocessor support.
  204. DTMF386D.DOC   -->  This file.
  205. REGISTER.DOC   -->  Registration form.
  206.  
  207.  
  208. REGISTRATION
  209. ▀▀▀▀▀▀▀▀▀▀▀▀
  210.  
  211. ** For registration, please fill out REGISTER.DOC and see the DEMO screen.
  212.    Specify media dispersement.
  213.  
  214. The REGISTERED version of this program allows unlimited decoding of numbers,
  215. and offers other features including:
  216.  
  217. 1) Automatic logging of the resulting decoded numbers to a log file.
  218.    The session is also time and date stamped.
  219.  
  220. 2) Time monitoring switch.  Allows deciphering of incoming streams of
  221.    numbers if tone activity is not detected for a set number of seconds.
  222.  
  223. 3) Supports the extended DTMF tones A,B,C,D.
  224.  
  225. 4) REGISTERED users will also receive a DTMF generator program.  This is
  226.    a DTMF tone generator which allows you to create any DTMF sequence
  227.    you wish.  The program allows you to specify a DTMF number sequence,
  228.    the sampling rate, and how long you want the pulses to be (in samples).
  229.  
  230.  
  231. TESTING
  232. ▀▀▀▀▀▀▀
  233.  
  234. I have thoroughly tested this code and I am not responsible for any mishaps
  235. that may happen when run on your computer.
  236.  
  237.  
  238.  
  239. SOUND CARDS TESTED:
  240.  
  241. Aztec Sound Galaxy 16 bit
  242. Sound Blaster 8 bit
  243. Sound Blaster ASP 16
  244. Generic SB compatible 16 bit
  245. Sound Blaster 16 VE *
  246.  
  247. * Some problems with the SB 16 VE have been reported and verified.
  248.   Mic and line inputs for the SB 16 VE gave spurious results.  No
  249.   explanation for this hardware problem has been determined.
  250.  
  251.  
  252. TESTING PLATFORM:
  253.  
  254. The code was tested on an IBM compatible 25MHz 486DX Cyrix upgrade PC
  255. with a Soundblaster Version 1.5 sound card running DOS 5.0.  Tones
  256. were recorded onto a cassette tape and played into a microphone which
  257. was connected to the mic input of the Soundblaster card.  It was able
  258. to run in quasi real-time mode with a 4000 Hz sample rate and decoded
  259. numbers with approximately 90% accuracy.  Real-time mode was
  260. unachievable but gave similar results.  Using this test vector data,
  261. normal dialing was decoded 95% of the time.  Burst dialing was
  262. decoded 95% of the time.  Noisy tones gave inconsistent results.
  263.  
  264. ** NOTE: All captured numbers were correctly decoded, the errors
  265.          stemmed from the fact that real-time decoding was not possible!
  266.  
  267.  
  268. Every action has been taken to ensure an error-free program.
  269.  
  270. Note, incompatibilities may stem from hardware deviations.
  271. For optimal performance, DO NOT launch this program while running under
  272. Microsoft Windows.
  273.  
  274.  
  275. For more information,
  276.  
  277. EMAIL:  shima@eel.ufl.edu
  278.  
  279. US MAIL:        J.M. Shima
  280.           3800 SW 34th St.  Apt. J-80
  281.            Gainesville, FL  32608
  282.  
  283.  
  284. TRADEMARKS
  285. ▀▀▀▀▀▀▀▀▀▀
  286.  
  287. Soundblaster is a trademark of Creative Lab's Inc.
  288. Microsoft Windows and DOS is a trademark of Microsoft.
  289.  
  290.